package com.molin.IOtest.charstreamTest;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class Demo3 {
    public static void main(String[] args) throws IOException {
        String path="D:\\IdeaProjects\\BasicCode\\mIdeaTest\\src\\com\\molin\\IOtest\\charstreamTest\\a.txt";
        FileWriter fw=new FileWriter(path);
        fw.write("NHK新闻报道");
        fw.flush();
        fw.write("666");
        fw.flush();
        fw.close();//关闭之前会做flush()操作。
    }
}
